package cn.wolfcode.wechat.service.impl;

import cn.wolfcode.wechat.domain.Hire;
import cn.wolfcode.wechat.mapper.HireMapper;
import cn.wolfcode.wechat.service.IHireService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service@Transactional
public class HireServiceImpl implements IHireService {

    @Autowired
    private HireMapper hireMapper;

    @Override
    public int save(Hire hire) {
        return hireMapper.insert(hire);
    }

    @Override
    public List<Hire> selectAll() {
        return hireMapper.selectAll();
    }
}
